package cn.aitstone.org.mapper;


import cn.aitstone.org.domain.Employee;
import cn.aitstone.org.query.EmployeeQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 部门实体类
 * @Author: Sheldon
 * @Version: 1.0
 * @Date:  2022/6/21 19:31
 */
public interface EmployeeMapper {

    /**
    * @Title: 查询方法
    * @Description: 查询所有
    * @Author: Sheldon
    * @Version: 1.0
    * @Date:  2022/6/21 19:28
    * @Parameters: []
    * @Return java.util.List<cn.aitstone.org.domain.Employee>
    */
    List<Employee> loadAll();

    /**
    * @Title: loadById
    * @Description: 根据id查询
    * @Author: Sheldon
    * @Version: 1.0
    * @Date:  2022/6/21 19:29
    * @Parameters: [id]
    * @Return cn.aitstone.org.domain.Employee
    */
    Employee loadById(Long id);

    /**
    * @Title: remove
    * @Description: 根据id删除
    * @Author: Sheldon
    * @Version: 1.0
    * @Date:  2022/6/21 19:30
    * @Parameters: [id]
    * @Return void
    */
    void remove(Long id);

    /**
    * @Title: save
    * @Description: 新增
    * @Author: Sheldon
    * @Version: 1.0
    * @Date:  2022/6/21 19:30
    * @Parameters: [employee]
    * @Return void
    */
    void save(Employee employee);

    /**
    * @Title: update
    * @Description: 根据Id修改
    * @Author: Sheldon
    * @Version: 1.0
    * @Date:  2022/6/21 19:30
    * @Parameters: [employee]
    * @Return void
    */
    void update(Employee employee);

    /**
    * @Title: queryData
    * @Description: 分页+高级查询
    * @Author: Sheldon
    * @Version: 1.0
    * @Date:  2022/6/21 19:31
    * @Parameters: [employeeQuery]
    * @Return java.util.List<cn.aitstone.org.domain.Employee>
    */
    List<Employee> queryData(EmployeeQuery employeeQuery);

    /**
    * @Title: queryCount
    * @Description: 查询总条数
    * @Author: Sheldon
    * @Version: 1.0
    * @Date:  2022/6/21 19:31
    * @Parameters: [employeeQuery]
    * @Return java.lang.Integer
    */
    Integer queryCount(EmployeeQuery employeeQuery);

    void batchdel(Long[] ids);

    Employee loadByUserName(String username);

    void removeEmployeeRole(Long id);

    void saveEmployeeRole(@Param("id") Long id, @Param("ids") List<Long> roles);

    Employee loadByLogininfoId(Long id);

    List<Employee> loadByShopId(Long shopId);
}
